import instance from "./instance";
//登录
export const getLogin = () => {
  return instance.post("/login", {
    account: "jykl", //用户名
    password: "a123456", //密码
  });
};
//列表
export const getList = (data) => {
  return instance.get("/article/list", data);
};
//新增
export const getXz = (data) => {
  return instance.post("/article", data);
};
//详情
export const getXq = (data) => {
  return instance.get(`/article/${data.id}`, data);
};
//编辑
export const getBj = (data) => {
  return instance.put(`/article/${data.id}`, data);
};
//搜索
export const getSs = (keyword) => {
  return instance.get("/article/list", { params: { keyword } });
};
//创建订单
export const getOrder=(data)=>{
    return instance.post('/order/create',data)
}
//支付
export const getZf=(data)=>{
    return instance.post('/order/alipay',data)
}
//支付状态
export const getZt=(data)=>{
    return instance.post('/order/getPayStatus',data)
}
